home *** CD-ROM | disk | FTP | other *** search
Wrap
(*^ ::[paletteColors = 128; currentKernel; fontset = title, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeTitle, center, M7, bold, L1, e8, 24, "Times"; ; fontset = subtitle, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeTitle, center, M7, bold, L1, e6, 18, "Times"; ; fontset = subsubtitle, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeTitle, center, M7, italic, L1, e6, 14, "Times"; ; fontset = section, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeSection, grayBox, M22, bold, L1, a20, 18, "Times"; ; fontset = subsection, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeSection, blackBox, M19, bold, L1, a15, 14, "Times"; ; fontset = subsubsection, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeSection, whiteBox, M18, bold, L1, a12, 12, "Times"; ; fontset = text, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1, 12; fontset = smalltext, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1, 10, "Times"; ; fontset = input, noPageBreakBelow, nowordwrap, preserveAspect, groupLikeInput, M42, N23, bold, L1, 12, "Courier"; ; fontset = output, output, inactive, noPageBreakBelow, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L-5, 12, "Courier"; ; fontset = message, inactive, noPageBreakBelow, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L1, 12, "Courier"; ; fontset = print, inactive, noPageBreakBelow, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L1, 12, "Courier"; ; fontset = info, inactive, noPageBreakBelow, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L1, 12, "Courier"; ; fontset = postscript, PostScript, formatAsPostScript, output, inactive, noPageBreakBelow, nowordwrap, preserveAspect, groupLikeGraphics, M7, l34, w282, h287, L1, 12, "Courier"; ; fontset = name, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, italic, L1, 10, "Times"; ; fontset = header, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1, 12; fontset = Left Header, nohscroll, cellOutline, 12; fontset = footer, inactive, nohscroll, noKeepOnOnePage, preserveAspect, center, M7, L1, 12; fontset = Left Footer, cellOutline, blackBox, 12; fontset = help, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1, 10, "Times"; ; fontset = clipboard, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1, 12; fontset = completions, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1, 12, "Courier"; ; fontset = special1, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1, 12; fontset = special2, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1, 12; fontset = special3, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1, 12; fontset = special4, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1, 12; fontset = special5, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1, 12; next21StandardFontEncoding; ] :[font = title; inactive; Cclosed; preserveAspect; startGroup; ] Lab 6: Vector Functions in Two Dimensions :[font = text; inactive; preserveAspect; ] In Lab 2 we saw that a line in two dimensions can be viewed as the graph of a two-dimensional vector-valued function. In general, the graph of a two-dimensional vector-valued function will be a curve in the plane. Each point (x,y) on the curve is a value of the function: f(t) = x i + y j . It is convenient to view the graph as a path of a particle moving in the plane, with the independent variable t representing time. Then f(t) = (x,y) is the location of the particle at time t. ;[s] 29:0,0;228,1;229,2;230,3;231,4;275,5;276,6;277,7;278,8;282,9;283,10;284,11;285,12;288,13;289,14;290,15;291,16;405,17;406,18;432,19;433,20;434,21;435,22;440,23;441,24;442,25;443,26;485,27;486,28;488,-1; 29:1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,1,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,1,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0; :[font = section; inactive; Cclosed; preserveAspect; startGroup; ] Graphs :[font = text; inactive; Cclosed; preserveAspect; startGroup; ] The following definitions will allow us to locate of the positions of the particle at times t=0, t=1, etc. ;[s] 5:0,0;92,1;93,2;97,3;98,4;108,-1; 5:1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0; :[font = input; preserveAspect; ] Clear[a,b,f,gr,pt,t,tr]; gr[f_][a_,b_] := ParametricPlot[ f[t], {t,a,b}, PlotPoints -> 64, AxesOrigin -> Automatic, AspectRatio -> Automatic ]; pt[f_][t_] := Graphics[ { PointSize[.04], Point[f[t]], Text[FontForm[TextForm[t],{"Plain",10}], f[t]+{0.1,-0.1}] } ]; tr[f_][a_,b_] := { gr[f][a,b], Table[ pt[f][t], {t,a,b} ] } :[font = text; inactive; preserveAspect; ] The symbol gr[f_][a_,b_] will be the graph of the function f over the interval [a,b]. It uses the same ParametricPlot command that we used in Lab 2. The PlotPoints -> 64 option produces a smooth curve by connecting 64 plotted points. The Axes -> {0,0} option forces the x-axis and y-axis to be drawn in the normal way through the origin (0,0). ;[s] 19:0,0;10,1;25,2;59,3;60,4;80,5;81,6;82,7;83,8;103,9;119,10;154,11;172,12;240,13;255,14;273,15;274,16;284,17;285,18;346,-1; 19:1,11,8,Times,0,12,0,0,0;1,10,8,Courier,1,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Courier,1,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Courier,1,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Courier,1,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0; :[font = text; inactive; preserveAspect; ] The symbol pt[f_][t_] will be the point f(t) in the plane. The TextForm function within that definition uses a Plain 10-point font to label the point with the given value of t. This is similar to the point labels that we used in Lab 2. ;[s] 11:0,0;10,1;22,2;40,3;41,4;42,5;43,6;63,7;73,8;175,9;176,10;237,-1; 11:1,11,8,Times,0,12,0,0,0;1,10,8,Courier,1,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Courier,1,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0; :[font = text; inactive; preserveAspect; endGroup; ] The symbol tr[f_][a_,b_] will be the trajectory of the function f over the interval [a,b]. It includes a Table of points produced by pt[f][t], one for each integral value of t in the range [a,b]. ;[s] 19:0,0;10,1;25,2;64,3;65,4;85,5;86,6;87,7;88,8;105,9;112,10;133,11;142,12;175,13;176,14;191,15;192,16;193,17;194,18;196,-1; 19:1,11,8,Times,0,12,0,0,0;1,10,8,Courier,1,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Courier,1,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Courier,1,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0; :[font = subsection; inactive; Cclosed; pageBreak; preserveAspect; startGroup; ] Examples :[font = text; inactive; Cclosed; preserveAspect; startGroup; ] Our first example is the same line graphed in Lab 2: :[font = input; preserveAspect; ] f[t_] := { 1+t, 3+2t }; Show[ tr[f][-1,3] ]; :[font = text; inactive; preserveAspect; ] (With this Show[ tr[f][a,b] ] command, ingore the ParametriPlot warning message and the first graphic. The objective is the second graphic.) ;[s] 5:0,0;10,1;30,2;49,3;64,4;141,-1; 5:1,11,8,Times,0,12,0,0,0;1,10,8,Courier,1,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Courier,1,12,0,0,0;1,11,8,Times,0,12,0,0,0; :[font = text; inactive; preserveAspect; endGroup; ] Notice how the location of the moving point is indicated at the times t=-1, t=0, t=1, t=2, and t=3. This helps us to see how the motion of the point produces the trajectory. ;[s] 9:0,0;70,1;71,2;76,3;77,4;81,5;82,6;86,7;87,8;176,-1; 9:1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0; :[font = text; inactive; Cclosed; preserveAspect; startGroup; ] This next example is identical to the previous linear function, except that the function for y has been changed to a quadratic by replacing t with t^2: ;[s] 5:0,0;140,1;141,2;147,3;148,4;152,-1; 5:1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0; :[font = input; preserveAspect; ] f[t_] := { 1+t, 3+2t^2 }; Show[ tr[f][-1,3] ]; :[font = text; inactive; preserveAspect; endGroup; ] The result is a parabolic trajectory. That this really is a parabola can be verified by solving the first equation x = 1+t for t and then substituting into the second equation: y = 3 + 2t^2 = 3 + 2(x-1)^2 = 2x^2 - 4x + 5. This is the equation of a parabola. ;[s] 17:0,0;116,1;117,2;122,3;123,4;129,5;130,6;179,7;180,8;188,9;189,10;200,11;201,12;210,13;211,14;217,15;238,16;239,-1; 17:1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,10,8,Times,2,12,0,0,0; :[font = text; inactive; Cclosed; preserveAspect; startGroup; ] The third example uses periodic functions for x and y, thereby producing a closed curve: ;[s] 5:0,0;46,1;47,2;52,3;53,4;89,-1; 5:1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0; :[font = input; preserveAspect; ] f[t_] := { 1+Cos[t], 3+2*Sin[t] }; Show[ tr[f][0,2Pi] ]; :[font = text; inactive; preserveAspect; endGroup; endGroup; ] This is an ellipse, as can be verified by eliminating the parameter t. ;[s] 3:0,0;68,1;69,2;71,-1; 3:1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0; :[font = subsection; inactive; Cclosed; preserveAspect; startGroup; ] Exercises :[font = text; inactive; preserveAspect; ] Graph the trajectories of the following vector-valued functions: :[font = text; inactive; preserveAspect; ] 1. f [t_] := { 1 + t*Cos[t], 3 + 2 t*Sin[t] } This is a spiral. ;[s] 3:0,0;58,1;64,2;66,-1; 3:1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0; :[font = text; inactive; preserveAspect; ] 2. f [t_] := { 2 Cos[t] + 4 Cos[2t], 2 Sin[t] - 4 Sin[2t] } This is called a trefoil. ;[s] 3:0,0;79,1;86,2;88,-1; 3:1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0; :[font = text; inactive; preserveAspect; endGroup; endGroup; ] 3. f [t_] := { 4 Cos[t] + Cos[7t], 4 Sin[t] + Sin[7t] } This is called an epicycloid. ;[s] 3:0,0;76,1;86,2;88,-1; 3:1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0; :[font = section; inactive; Cclosed; pageBreak; preserveAspect; startGroup; ] The Velocity Vector :[font = text; inactive; Cclosed; preserveAspect; startGroup; ] This next block of definitions extends those of the previous section. :[font = input; preserveAspect; ] Clear[a,b,f,t,v,tr]; v[f_][t_] := Graphics[ { Line[ {f[t], f[t]+f'[t]} ], Text[ FontForm[TextForm[t+1],{"Plain",10}], f[t]+f'[t]+{0.1,0.1} ] }, PointSize[.04], Point[f[t]+f'[t]] ] tr[f_][a_,b_] := { gr[f][a,b], Table[ pt[f][t], {t,a,b} ], Table[ v[f][t], {t,a,b} ]} :[font = text; inactive; preserveAspect; ] The symbol v[f_][t_] will be the velocity vector of the function f at the point f(t). Notice how it is defined. As a "free" vector, the velocity vector at time t is simply the derivative f'(t). But since it is the velocity of the particle at the point (x,y) = f(t), we want to draw the vector emanating from that point. This is done with the function Line[ {f[t], f[t]+f'[t]} ] , which draws a line segment from the point f(t) to the point f(t) + f'(t) . That's a displacement of f'(t) from the point f(t). :[font = text; inactive; preserveAspect; endGroup; ] The symbol tr[f_][a_,b_] is similar to its previous definition: it will be the trajectory of the function f over the interval [a,b]. The second Table produces the velocity vector at each integral value of t in the range [a,b]. ;[s] 17:0,0;10,1;25,2;106,3;107,4;127,5;128,6;129,7;130,8;144,9;151,10;206,11;207,12;222,13;223,14;224,15;225,16;227,-1; 17:1,11,8,Times,0,12,0,0,0;1,10,8,Courier,1,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Courier,1,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0; :[font = subsection; inactive; Cclosed; pageBreak; preserveAspect; startGroup; ] Examples :[font = text; inactive; Cclosed; preserveAspect; startGroup; ] Here is the same parabola graphed above, now with its velocity vectors: :[font = input; preserveAspect; ] f[t_] := { 1+t, 3+2t^2 }; Show[ tr[f][-1,3] ]; :[font = text; inactive; preserveAspect; endGroup; ] The point at the end of each velocity vector is where the moving particle would be at the time indicated if it were suddenly unconstrained at the instant it reached the initial point of the vector. :[font = text; inactive; Cclosed; preserveAspect; startGroup; ] Here are the velocity vectors for the ellipse graphed above: :[font = input; preserveAspect; endGroup; endGroup; ] f[t_] := { 1+Cos[t], 3+2Sin[t] }; Show[ tr[f][0,2Pi] ]; :[font = subsection; inactive; Cclosed; preserveAspect; startGroup; ] Exercises :[font = text; inactive; preserveAspect; ] Graph the trajectories of the following vector-valued functions, including their velocity vectors: :[font = text; inactive; preserveAspect; ] 1. f [t_] := { 1 + t*Cos[t], 3 + 2 t*Sin[t] } This is the spiral graphed above. :[font = text; inactive; preserveAspect; ] 2. f [t_] := { 2 Cos[t] + 4 Cos[2t], 2 Sin[t] - 4 Sin[2t] } This is the trefoil graphed above :[font = text; inactive; preserveAspect; endGroup; endGroup; ] 3. f [t_] := { Cos[3t]+4Cos[t], Sin[3t]+4Sin[t] } This is the epitrochoid shown on page 458 in Stein. It is the shape of the combustion chamber used in the Wankel rotary engine found in Mazda sports cars. It is also known as the "hippopede" (hippopotamus' footprint). :[font = section; inactive; Cclosed; pageBreak; preserveAspect; startGroup; ] Polar Coordinates :[font = text; inactive; Cclosed; preserveAspect; startGroup; ] In this last section we see how to use Mathematica to graph curves defined in polar form. It is simple to do, but it requires the use of an external package: ;[s] 3:0,0;39,1;50,2;159,-1; 3:1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0; :[font = input; preserveAspect; ] <<Graphics`Graphics` :[font = text; inactive; preserveAspect; endGroup; ] This package includes the definition of the PolarPlot function. It draws the trajectory for a radial function that specifies the distance from the origin to the moving particle. ;[s] 3:0,0;43,1;54,2;179,-1; 3:1,11,8,Times,0,12,0,0,0;1,10,8,Courier,1,12,0,0,0;1,11,8,Times,0,12,0,0,0; :[font = subsection; inactive; Cclosed; preserveAspect; startGroup; ] Examples :[font = text; inactive; preserveAspect; ] Since both of these radial functions are periodic, their trajectories are closed curves. Also, both functions are zero in more than one point in the interval [0,p], so the curves are self-intersecting: ;[s] 3:0,0;162,1;163,2;203,-1; 3:1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0; :[font = input; preserveAspect; ] PolarPlot[ 3Sin[t] + 1, {t,0,2Pi}]; :[font = input; preserveAspect; endGroup; ] PolarPlot[ Sin[3t], {t,0,2Pi}]; :[font = subsection; inactive; Cclosed; preserveAspect; startGroup; ] Exercises :[font = text; inactive; preserveAspect; ] Graph each of the following polar curves: :[font = text; inactive; preserveAspect; ] 1. r[t_] := Sin[t] :[font = text; inactive; preserveAspect; ] 2. r[t_] := 1 - Sin[t] :[font = text; inactive; preserveAspect; ] 3. r[t_] := 2 - Sin[t] :[font = text; inactive; preserveAspect; ] 4. r[t_] := 3 - 2*Sin[t] :[font = text; inactive; preserveAspect; ] 5. r[t_] := 4 - 3*Sin[t] :[font = text; inactive; preserveAspect; ] 6. r[t_] := 1 / (4 - 3*Sin[t]) :[font = text; inactive; preserveAspect; ] 7. r[t_] := Sqrt[3t] :[font = text; inactive; preserveAspect; ] 8. r[t_] := 2 :[font = text; inactive; preserveAspect; ] 9. r[t_] := Cos[2 t] :[font = text; inactive; preserveAspect; ] 10. r[t_] := Cos[5 t] :[font = text; inactive; preserveAspect; ] 11. r[t_] := Sin[5 t] :[font = text; inactive; preserveAspect; endGroup; endGroup; endGroup; ] 12. r[t_] := Sin[50 t] ^*)